<html>
<head>
</head>
<body>
<div id="tabcontent" >
<h1><?php echo $form_caption; ?>
</h1>
<div class='toolbar ui-widget-header ui-corner-all'>
<a href='<?php echo site_url('/admin/cprovinsi/');?>' class='link_list'>Daftar provinsi</a>
</div>
<?php
  echo $add_info;	
  echo "<br>";
  echo form_open($action);
?>
<table width="826" align="left">
<tr>
  <td width="180">Nama</td>
  <td width="334"><input name="nama" type='text' id="nama" size="35" value="<?php echo $provinsi->nama_provinsi; ?>"></td>
</tr>
<tr>
  <td width="180">Jumlah Kabupaten/Kotamadya</td>
  <td width="334"><input name="kabupuaten" type='text' id="kabupuaten" size="10" value="<?php echo $provinsi->jumlah_kabupaten; ?>"></td>
</tr>
<tr>
  <td width="180">Jumlah Kecamatan</td>
  <td width="334"><input name="kecamatan" type='text' id="kecamatan" size="10" value="<?php echo $provinsi->jumlah_kecamatan; ?>"></td>
</tr>
<tr>
  <td width="180">Jumlah Yayasan</td>
  <td width="334"><input name="yayasan" type='text' id="yayasan" size="10" value="<?php echo $provinsi->jumlah_yayasan; ?>"></td>
</tr>
<tr>
  <td>&nbsp;</td>
  <td><input type="submit" name="Submit" value="<?php echo $btn_caption; ?>">
  <input type="hidden" name="id_provinsi" value="<?php echo $provinsi->id_provinsi; ?>">
  </td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
</tr>
</table>
<?php
form_close();
?>
</div>
<Script language="javascript">
jQuery(document).ready(function(){
	$("#tanggal").datepicker({dateFormat:"dd/mm/yy",altField:"#tanggal_file",altFormat:"yy-mm-dd",changeMonth:true,changeYear:true});
	
	LoadRoleAutoComplete(_base_url,"#role","#h_role");
});


function LoadRoleAutoComplete(_base_url,idtext,idhidden) {
	
	$(idtext).autocomplete(_base_url + "/index.php/agama/xrole/get_role", 
	{
		dataType : "json",
		formatItem: false,
		retrieveComplete : function(data){
			if(data!="0"){
				return data;
			}
		},
		
		onItemSelect : function(li, row) {
			$(idhidden).val(row[1]);	
		}
	});
}

</Script>
</body>
</html>
